/* @(#)GSOrderSubmitVO.java    
 *
 * Project: GS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Jenny Li     2006-2-15    新增
 *   Tuthmos Liu  2008-5-08    新增送货地址，单号
 *   Tuthmos Liu  2008-07-02   新增签收人，签收日期
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.vo;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hitrust.gs.service.GSBaseBean;

/**
 * 
 */
public class GSOrderReceiveQueryVO implements GSBaseBean {
    
    public String orderid;
    public String manufactureId;    //产品编码
    public String manufactureName;  //产品名称
    public String manufSpec;        //产品规格
    public String manufType;        //产品型号
    public String manufBrand;       //产品品牌
    public double orderCount;       //订单数量
    public String quantUnit;        //计量单位
    public String orderDetailStatus;//订单明细状态
    public String orderCreateDate;  //创建时间
    public String orderDeptId;      //订货单位
    public String deliverMode;      //配送方式
    public String banlanceMode;     //结算方式
    public String deliverGoodsAddr; //送货地址
    public String deliverGoodsNo;   //送货单号
    public String deliverGoodsDate; //送货时间

    public String conCentricityId;  //集中编码
    public String orderDetailId;    //订单明细编码
    public String orderDeptName;    //采购单位名称
    public double goodUnitprice;    //单价
    
    public double signinCount;      //签收数量
    public double cursigninCount;   //采购商签收数量，同上
    public String cursigninDate;    //采购商签收日期，同上
    public String signin_person;    //签收人
    public String signin_explain;   //签收说明
    public String signin_date;      //签收日期
    public String mode;//压库、买断
    public String sign;
    /* (non-Javadoc)
     * @see com.hitrust.gs.service.GSBaseBean#process(java.sql.ResultSet)
     */
    public Object process(ResultSet aResultSet) throws SQLException {
		GSOrderReceiveQueryVO tGSOrderVO = new GSOrderReceiveQueryVO();
        tGSOrderVO.orderDetailId = aResultSet.getString("P1").trim();
        tGSOrderVO.orderDetailStatus = aResultSet.getString("P2").trim();
        tGSOrderVO.manufactureName = aResultSet.getString("P3").trim();
        tGSOrderVO.manufSpec = aResultSet.getString("P4") == null? "":aResultSet.getString("P4").trim();
        tGSOrderVO.manufType = aResultSet.getString("P5") == null? "":aResultSet.getString("P5").trim();
        tGSOrderVO.manufBrand = aResultSet.getString("P6") == null? "":aResultSet.getString("P6").trim(); 
        tGSOrderVO.orderCount = aResultSet.getDouble("P7");
        tGSOrderVO.orderCreateDate = aResultSet.getString("P8");
        tGSOrderVO.orderDeptId = aResultSet.getString("P9");
        tGSOrderVO.orderDeptName = aResultSet.getString("P10") == null?"":aResultSet.getString("P10");
        tGSOrderVO.deliverMode = aResultSet.getString("P11") == null?"":aResultSet.getString("P11");
        tGSOrderVO.banlanceMode = aResultSet.getString("P12")== null?"":aResultSet.getString("P12");;
        tGSOrderVO.quantUnit = aResultSet.getString("P13")== null?"":aResultSet.getString("P13");;
        tGSOrderVO.conCentricityId = aResultSet.getString("P14");
        tGSOrderVO.orderid = aResultSet.getString("P15");
        tGSOrderVO.goodUnitprice = aResultSet.getDouble("P16");
        tGSOrderVO.manufactureId = aResultSet.getString("P17");
        tGSOrderVO.deliverGoodsAddr = aResultSet.getString("P23") == null? "":aResultSet.getString("P23").trim();
        tGSOrderVO.deliverGoodsNo = aResultSet.getString("P24") == null? "":aResultSet.getString("P24").trim();
        tGSOrderVO.mode = aResultSet.getString("P25") == null? "":aResultSet.getString("P25").trim();
        tGSOrderVO.sign = aResultSet.getString("P26") == null? "":aResultSet.getString("P26").trim();
		String deliverGoodsDateStr = "";
		if (aResultSet.getString("P18") != null)
		{
			deliverGoodsDateStr = aResultSet.getString("P18");
		}
        
		if (aResultSet.getString("P19") != null && !deliverGoodsDateStr.equals(""))
		{
			if (aResultSet.getString("P19").equals("1")) deliverGoodsDateStr += " 8:00-12:00";
			if (aResultSet.getString("P19").equals("2")) deliverGoodsDateStr += " 13:00-18:00";
			if (aResultSet.getString("P19").equals("3")) deliverGoodsDateStr += " 全天";
		}
		
		if (aResultSet.getString("P20") != null)
		{
			tGSOrderVO.signinCount = aResultSet.getDouble("P20");
		}else{
			tGSOrderVO.signinCount = 0;
		}
		
		if (aResultSet.getString("P21") != null)
		{
			tGSOrderVO.cursigninCount = aResultSet.getDouble("P21");
		}else{
			tGSOrderVO.cursigninCount = 0;
		}
		
		if (aResultSet.getString("P22") != null)
		{
			tGSOrderVO.cursigninDate = aResultSet.getString("P22");
		}else
		{
			tGSOrderVO.cursigninDate = "";		
		}
        
		tGSOrderVO.deliverGoodsDate = deliverGoodsDateStr;       
		
		tGSOrderVO.orderid = aResultSet.getString("GS_ORDER_TEMPID");
        
        return tGSOrderVO;
    }

}
